package com.reformer.commons.constant;

/**
 * 终端类型
 */
public enum TerminalTypeEnum {
    HANDSET(1),
    WECHAT(2),
    ALIPAY(3),
    CAROWNER_APP(4),
    PORTAL(5);

    private int type;

    TerminalTypeEnum(int type) {
        this.type=type;
    }

    public static TerminalTypeEnum findByType(int type) {
        for (TerminalTypeEnum terminalTypeEnum : TerminalTypeEnum.values()) {
            if (terminalTypeEnum.getType() == type) {
                return terminalTypeEnum;
            }
        }
        return null;
    }

    public int getType() {
        return type;
    }
}
